home *** CD-ROM | disk | FTP | other *** search
/ Night Owl 6 / Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso / 019a / amac40.zip / SRL.QM < prev    next >
Text File  |  1991-06-20  |  5KB  |  100 lines

  1. *                               SRL.QM                  June 20, 1991
  2. * ----------------------------------------------------------------------
  3. * @(7) - Search ONLY from command line
  4. * -------------------------[ uses FGREP.COM ]---------------------------
  5. *
  6. * ** MUST BE FIRST MACRO FOR AUTO-EXECUTE SRL.BAT, SZ.BAT and SZR.BAT ***
  7.  
  8. * SRL.QM must be run from the command line, not while editing.
  9. * Parameters may either be input from the command line or in response
  10. * to query prompts. Macro @7 is the auto-execute macro for SRL.BAT,
  11. * SZ.BAT and SZR.BAT. See SZ.BAT and SZR.BAT for instructions to
  12. * search/replace files within ZIP files.
  13.  
  14. * To search for text in non-zip files type SRL  at the command line and
  15. * answer prompt for search text. After the files containing the search
  16. * text are loaded, press F4 to highlight first occurence of search
  17. * text. Press F6 then F4 to highlight first occurence of search text in
  18. * first file containing search text. IT CANNOT BE RUN WHILE EDITING!
  19.  
  20. * An alternative to using the batch file SRL.BAT is to use the
  21. * following PCED synonym instead:
  22. *
  23. * SYN     SRLFG 'echo off^break on^FGREP.COM -fl "&A" @SRCH-FG.LST >c:\!
  24. *                ^Q. c:\! /Esrl.mac^break off^echo on'
  25. *
  26. * Just add this synonym to the bottom of your synonym file on one line,
  27. * or type CED SYN SRLFG 'echo ...............'.
  28. *
  29. * To run using PCED, type SRLFG [search text] at the command line.
  30. *
  31. * When finished running with the batch file or PCED, the following
  32. * files are loaded for viewing or editing:
  33. *
  34. * Window 1       -list of files found & search text (output from FGREP.COM)
  35. * Window 2...n+1 -files containing search text, n = (# files found)
  36. *
  37. * Temporary file names are:
  38. *
  39. * c:\$.ql  List of files found & search text (output from FGREP.COM)
  40. * c:\!     Same as c:$.ql
  41. * c:\$     Output of Dos SET
  42. *
  43. @7 macrobegin
  44.         altwordset                      * For all file names
  45. * ------------------ display "No found text" message -----------------*
  46.         cursordown cursorup             * Test if any search text found
  47.         jtrue START:                    * If found, move on
  48.  MESSAGE:                               *
  49.         "No found text "                * If not found, display this
  50.         jump END:                       * End macro if no found text
  51.  START:                                 *
  52. * ---------------------------- load files ----------------------------*
  53.         endfile                         * Get to end of file
  54.  LOADAGAIN:                             *
  55.         unmarkblock                     * Unmark last file name
  56.         find #42 "Fi" return "B"  return* Find file name
  57.  jfalse  MESSAGE:                       * No find ?, show message, end
  58.         wordright                       * Move to space
  59.         wordright                       * Move to file name
  60.         markcolumn                      * Mark it
  61.         endline                         * Get all name in block
  62.         copy                            * Copy file name to scrap
  63.         EditFile                        * Get ready to load
  64.         CurrentFilename " "             * To force return *here*
  65.         Paste Return                    * Paste file name & do it!
  66.         cursorup                        * Go to next line
  67.  jfalse ENDLOAD:                        * No more filenames? Done load
  68.  jump LOADAGAIN:                        * Check again
  69.  ENDLOAD:                               *
  70. * -------------------- initialize find for search --------------------*
  71.         editfile "c:\$" return          * Load tempfile
  72.         find  "S~~" return return      ** Find S~~ in SET output       |2.7
  73.         find "=" return return          * Move to =                    |
  74.         cursorright                     * Move first character         |
  75.         markcharacter                   * Mark it                      |
  76.         endline                         * Move to end of text          |
  77.         copy                            * Copy search text to scrap    |
  78.         killfile quit                   * Kill/quit temp for next time
  79.         Find paste return Escape        * Initialize find for F4
  80.  END:                                   *
  81. * ------------------------------ reset ------------------------------*
  82.         defaultwordset                  * Set default
  83. *
  84. * 83 bytes Sat  02-09-1991  10:47:23
  85. * 107 bytes Thu  04-25-1991  12:04:27 added "No found text" message
  86. *                                     added find initialize for search
  87. *                                     changed "c:" to "c:\"
  88. * 110 bytes Tue  04-30-1991  22:11:07 changed initialize find routine
  89.  
  90. * (F4)
  91. f4      RepeatFind
  92.  
  93. * (F5)
  94. f5      PrevFile
  95.  
  96. * (F6)
  97. f6      NextFile
  98.  
  99. * Tom Hogshead
  100.